package jianzhiOffer;

public class num46 {
    public int translateNum(int num) {
        String str = String.valueOf(num);
        int a = 1,b = 1;
        for(int i = 2; i <= str.length(); i++) {
            String temp = str.substring(i - 2,i);
            int c = a;
            if(temp.compareTo("10") >= 0 && temp.compareTo("25") <= 0) {
                c = a + b;
            }
            b = a;
            a = c;
        }
        return a;
    }
}
